package com.cy.pj.module.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class ModuleController {//代表任意模块的controller

    @RequestMapping("doCalculate/{n1}/{n2}")
    @ResponseBody
    public String doCalculate(@PathVariable Integer n1,@PathVariable Integer n2) {
            Integer result = n1 / n2;
            return "result is " + result;
    }
}
